From: Claudio Cambra Date: Fri, 7 Feb 2025 02:09:30 +0000 (+0800) Subject: gui/tray: Present successful sync tray icon is we just have idle file provider accounts X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~85^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=c9123179479233132a7f9b2216b5c99303e7efbe;p=nextcloud-desktop.git gui/tray: Present successful sync tray icon is we just have idle file provider accounts Signed-off-by: Claudio Cambra --- diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index f38326647..872635352 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -313,6 +313,7 @@ void ownCloudGui::slotComputeOverallSyncStatus() QList problemFileProviderAccounts; QList syncingFileProviderAccounts; QList successFileProviderAccounts; + QList idleFileProviderAccounts; if (Mac::FileProvider::fileProviderAvailable()) { for (const auto &accountState : AccountManager::instance()->accounts()) { @@ -329,6 +330,7 @@ void ownCloudGui::slotComputeOverallSyncStatus() switch (const auto latestStatus = fileProvider->socketServer()->latestReceivedSyncStatusForAccount(accountState->account())) { case SyncResult::Undefined: case SyncResult::NotYetStarted: + idleFileProviderAccounts.append(accountFpId); break; case SyncResult::SyncPrepare: case SyncResult::SyncRunning: @@ -343,7 +345,7 @@ void ownCloudGui::slotComputeOverallSyncStatus() case SyncResult::SetupError: problemFileProviderAccounts.append(accountFpId); break; - case SyncResult::Paused: + case SyncResult::Paused: // This is not technically possible with VFS break; } } @@ -405,7 +407,7 @@ void ownCloudGui::slotComputeOverallSyncStatus() overallStatus != SyncResult::Error && overallStatus != SyncResult::SetupError) { overallStatus = SyncResult::SyncRunning; - } else if (!successFileProviderAccounts.isEmpty() && + } else if ((!successFileProviderAccounts.isEmpty() || (problemFileProviderAccounts.isEmpty() && syncingFileProviderAccounts.isEmpty() && !idleFileProviderAccounts.isEmpty())) && overallStatus != SyncResult::SyncRunning && overallStatus != SyncResult::Problem && overallStatus != SyncResult::Error &&